package advanced.design_mode.observermode;

public class ConcreateSubject extends Subject {
    private int state;

    public int getState() {
        return state;
    }

    public void setState(int state) {

        this.state = state;
        //通知所有的观察者, 值发生了改变
        this.notifyAllObservers();
    }
}
